package com.gz.gwt.mouse.client.demo;

import com.google.gwt.event.dom.client.ContextMenuEvent;
import com.google.gwt.event.dom.client.ContextMenuHandler;
import com.google.gwt.event.dom.client.HasContextMenuHandlers;
import com.google.gwt.event.shared.HandlerRegistration;

import gwt.g2d.client.graphics.Surface;

/**
 * Advance Surface with Context Menu Handler
 * @author gregory.zussa
 *
 */
public class AdvSurface extends Surface implements HasContextMenuHandlers{
	
	public AdvSurface(int width, int height) {
		super(width, height);
	}
	
	public HandlerRegistration addContextMenuHandler(ContextMenuHandler handler) {
	    return addDomHandler(handler, ContextMenuEvent.getType());
	}	
}
